
***********************************************************************************
* 2. Figures A.5-A.9
***********************************************************************************

use  "Data_temp/polit_involv.dta", clear

global t100_lab	t{subscript:-1}
global t0_lab	t{subscript:0}
global t1_lab	t{subscript:1}
global t2_lab	t{subscript:2}
global t3_lab	t{subscript:3}


cap program drop plot_rd

program define plot_rd


	rdplot `1' age100 if inrange(age100,-24,24), p(1) nbins(12 12)  ///
	graph_options(legend(off) xlab(-24(12)24) yt("`4'") ///
	subt("${t100_lab}") ylab(`2') xt("Relative age in months to cut-off", ///
	size(medsmall)) name(t100, replace)) 
	
	rdplot `1' age0 if inrange(age0,-24,24) & rel_year>=0, p(1) nbins(12 24)  ///
	graph_options(legend(off) xlab(-24(12)24) yt("`4'") ///
	subt("${t0_lab}") ylab(`2') ///
	xt("Relative age in months to cut-off", size(medsmall)) name(t0, replace)) 
	
	
	forvalues x = 1/3 {
		
		rdplot `1' age`x' if inrange(age`x',-24,24), p(1) nbins(24 24)  ///
		graph_options(legend(off) xlab(-24(12)24)  yt("`4'") name(t`x', replace) /// 
		subt("${t`x'_lab}") ylab(`2') xt("Relative age in months to cut-off", ///
		size(medsmall)))  

		}
		graph combine t100 t0 t1 t2 t3, subt("") imargin(tiny) ycommon holes(3)
		graph export "Figures/a_fg`3'.eps", replace
		

end

	
plot_rd index			-.8(.2).2		6
plot_rd party_closer1	0.2(0.1)0.6		7	"Share"	
plot_rd interest_polit	0.25(0.05)0.5	8	"Share"
plot_rd vote_agree		0.4(0.1)0.9		9	"Share"
plot_rd vote_party		0.5(0.1)0.8		10	"Share"
plot_rd member_party	0(0.05)0.25		11	"Share"




